import type { CartItem } from '@/types/cart'
import { request } from '@/utils/reuqest'

/**
 * 加入购物车
 * @param data 请求体参数
 */
export const postMemberCartAPI = (data: { skuId: string; count: number }) => {
  return request('/member/cart', 'POST', data)
}

/**
 * 获取购物车列表
 */
export const getMemberCartAPI = () => {
  return request<CartItem[]>('/member/cart')
}
